package com.java8.lambda;

/**
 * @Author HBZ
 * @Date 2020/8/14 23:22
 * @Description
 */
public class Validator {
    private final ValidationStrategy strategy;

    public Validator(ValidationStrategy v) {
        this.strategy = v;
    }

    public boolean validate(String s) {
        return strategy.execute(s);
    }


}
